package core
{
	import adobe.utils.MMExecute;

	/**
	 * @author lbineau
	 */
	public class Functions
	{
		public static function runCommand(cmdName : String, ...args) : String
		{
			if ( args.length > 0 )
			{
				var arguments : String = "";
				for each (var obj : * in args)
					arguments += ",'" + obj + "'";
				return MMExecute("fl.runScript( fl.configURI + '" + Constants.JSFL_PATH + "', '" + cmdName + "' " + arguments + " );");
			}
			else
			{
				return MMExecute("fl.runScript( fl.configURI + '" + Constants.JSFL_PATH + "', '" + cmdName + "' )");
			}
		}
	}
}
